 /**
   * Copyright 2014 Viettel Telecom. All rights reserved.
   * VIETTEL PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   */
 package com.viettel.core.bussiness.cms; 
import org.springframework.beans.factory.annotation.Autowired;

import com.viettel.core.dao.cms.UnitPriceDAO;
import com.viettel.core.entities.cms.UnitPrice;
import com.viettel.core.exceptions.BusinessException;
import com.viettel.core.exceptions.DataAccessException;
 /**
   *  Mo ta muc dich cua lop (interface)
   *  @author: TOANTM1
   *  @version:  
   *  @since: 03/03/2014 - 09:43:43
   */
 public class UnitPriceMgrImpl implements UnitPriceMgr{ 
	@Autowired 
	UnitPriceDAO unitpriceDAO; 
 
 	/**@author TOANTM1
  	 * 03/03/2014 - 09:43:43
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public UnitPrice getUnitPriceById(Integer id) throws BusinessException { 
		try { 
			return  unitpriceDAO.getUnitPriceById(id); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 03/03/2014 - 09:43:43
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public UnitPrice createUnitPrice(UnitPrice unitprice) throws BusinessException { 
		try { 
			return unitpriceDAO.createUnitPrice(unitprice); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 03/03/2014 - 09:43:43
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void updateUnitPrice(UnitPrice unitprice) throws BusinessException { 
		try { 
			unitpriceDAO.updateUnitPrice(unitprice); 
		} catch (DataAccessException e) {	 
			throw new BusinessException(e); 
		} 
	} 
 
 	/**@author TOANTM1
  	 * 03/03/2014 - 09:43:43
  	 * For: 
  	 * @description: 
  	 */
 	@Override 
	public void deleteUnitPrice(UnitPrice unitprice) throws BusinessException { 
		try { 
			unitpriceDAO.deleteUnitPrice(unitprice); 
		} catch (DataAccessException e) { 
			throw new BusinessException(e); 
		} 
	} 
} 
